<CFQUERY NAME="qryCLKPROJ" DATASOURCE="#client.company_dsn#">
	SELECT *
	FROM   CLKPROJ
	WHERE  ROUTEID = '#GetRecord.ROUTEID#'
</CFQUERY>

<CFIF qryCLKPROJ.RecordCount>
	<CFTRY>
		<CFQUERY NAME="qryUpdateCLKPROJ" DATASOURCE="#client.company_dsn#">
			UPDATE CLKPROJ
			SET ACTIVE = 'N', PROJCODESTATUS = 'Inactive'
			WHERE CUSTOMERCODE = 'qryCLKPROJ.CUSTOMERCODE'
			AND PROJECTCODE <> 'qryCLKPROJ.PROJECTCODE'
		</CFQUERY>
		<CFCATCH TYPE="ANY">
			<CFSET sWarn = "#CFCATCH.MESSAGE# -  #CFCATCH.DETAIL#">
		</CFCATCH>
	</CFTRY>
</CFIF>